<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Commands and Messages: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="gtk-migrating-unique-GtkApplication.html" title="Migrating from libunique to GApplication or GtkApplication">
<link rel="prev" href="gtk-migrating-unique-GtkApplication.html" title="Migrating from libunique to GApplication or GtkApplication">
<link rel="next" href="gtk-migrating-smclient-GtkApplication.html" title="Migrating from EggSMClient to GtkApplication">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gtk-migrating-unique-GtkApplication.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gtk-migrating-unique-GtkApplication.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gtk-migrating-smclient-GtkApplication.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.6.5.6"></a>Commands and Messages</h2></div></div></div>
<p>
      libunique lets you send messages with commands to a running
      instance using unique_app_send_message(). The commands can be either
      predefined or custom. Some of the predefined libunique commands have
      equivalents in GApplication. Instead of sending the UNIQUE_ACTIVATE
      command, call <code class="function">g_application_activate()</code>, instead of sending the
      UNIQUE_OPEN command, call <code class="function">g_application_open()</code>. The
      UNIQUE_NEW and UNIQUE_CLOSE and user-defined commands don't
      have direct replacement at this time.
    </p>
<p>
      As a replacement for custom commands, GApplication implements the
      <span class="type">GActionGroup</span> interface and lets you add a group of actions with
      <code class="function">g_application_set_action_group()</code>. The actions can then be invoked,
      either by using the D-Bus interface for <span class="type">GAction</span> directly, or by
      calling <code class="function">g_action_group_activate_action()</code> from another instance of
      the GApplication. The <span class="type">GApplication</span> documentation contains an
      example for using GApplication with actions.
    </p>
<p>
      For more complex needs, GApplication supports passing entire
      commandlines to the running instance.
    </p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>